class Solution {
public:
    int translateNum(int num) {
      vector<int> dp(10000,0);
      dp[0] = 1;
      int index = 1;
      while(num > 0){
        int x = num % 100;
        if(x <= 25 && x >= 10){
          if(index > 1){
            dp[index] = dp[index - 1] + dp[index - 2];
          }else{
            dp[index] = dp[index - 1] + 1;
          }
        }else{
          dp[index] = dp[index - 1];
        }
        index++;
        num /= 10;
      }
      return dp[index - 1];
    }
};
